<?php
namespace App\Modules\Health\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;

class DiseaseScheme extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'health_disease_scheme';

    protected $primaryKey = 'id';

    protected $fillable = [
        'disease_id', // 病症id
        'acu_id', // 穴位id
        'description', // 穴数
        'day', // 天数
        'time', // 时长 单位分钟
    ];

    public function disease()
    {
        return $this->belongsTo(Disease::class, 'disease_id');
    }

    public function acu()
    {
        return $this->belongsTo(Acupoint::class, 'acu_id');
    }
}
